function RegWriteBinaryValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
Writes the specified REG_BINARY-type registry value. Returns True if successful, False otherwise.
begin RegWriteBinaryValue(HKEY_CURRENT_USER, 'Software\My Company\My Program', 'BinaryTest', 'Whatever' + #1#2#3#4); end;